package com.xja.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.xja.model.pojo.TongueFeature;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 舌诊表
 * </p>
 *
 * @author caijg
 * @since 2025-06-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName(value = "tongue", autoResultMap = true)
public class Tongue implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户id
     */
    private Long userId;

    /**
     * 舌苔图片
     */
    private String imageUrl;

    /**
     * 苔质
     */
    @TableField(value = "coating_quality", typeHandler = JacksonTypeHandler.class)
    private TongueFeature coatingQuality;

    /**
     * 苔色
     */
    @TableField(value = "coating_color", typeHandler = JacksonTypeHandler.class)
    private TongueFeature coatingColor;

    /**
     * 舌神
     */
    @TableField(value = "tongue_vitality", typeHandler = JacksonTypeHandler.class)
    private TongueFeature tongueVitality;

    /**
     * 舌色
     */
    @TableField(value = "tongue_color", typeHandler = JacksonTypeHandler.class)
    private TongueFeature tongueColor;

    /**
     * 舌形
     */
    @TableField(value = "tongue_shape", typeHandler = JacksonTypeHandler.class)
    private TongueFeature tongueShape;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;
}
